<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="MessageTypeEdt.aspx.cs" Inherits="MessageTypeEdt" Title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

    <div>
        <br />
        <strong>Message Type<br />
        </strong>
        <br />
        <asp:GridView ID="gvMessageType" HeaderStyle-HorizontalAlign="left" runat="server" AutoGenerateColumns="False" Height="133px"
            Width="571px" AllowPaging="True" AllowSorting="True" EmptyDataText="No Message Types Found" 
            OnSorting="gvMessageType_Sorting" OnRowCommand="gvMessageType_RowCommand" OnRowDataBound="gvMessageType_RowDataBound" OnPageIndexChanging="gvMessageType_PageIndexChanging" OnRowUpdating="gvMessageType_RowUpdating">
            <Columns>
                <asp:BoundField HeaderText="MessageType ID" DataField="MessageTypeID"  SortExpression="MessageTypeID" ReadOnly="True" />
                <asp:TemplateField HeaderText="Description" SortExpression="Description">
                    <EditItemTemplate>
                        <asp:TextBox ID="TextBox1" runat="server" MaxLength="500" Text='<%# Bind("Description") %>' onkeypress="return ValidateKey()" Width="75%"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TextBox1"
                            ErrorMessage="RequiredFieldValidator">*</asp:RequiredFieldValidator>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:Label ID="Label1" runat="server" Text='<%# Bind("Description") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="XML Schema" SortExpression="XmlSchema">
                    <EditItemTemplate>
                        <asp:TextBox ID="TextBox2" runat="server" MaxLength="99" Text='<%# Bind("XmlSchema") %>' onkeypress="return ValidateKey()" Width="75%"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="TextBox2"
                            ErrorMessage="RequiredFieldValidator">*</asp:RequiredFieldValidator>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:Label ID="Label2" runat="server" Text='<%# Bind("XmlSchema") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Version" SortExpression="Version">
                    <EditItemTemplate>
                        <asp:TextBox ID="TextBox3" runat="server" MaxLength="9" Text='<%# Bind("Version") %>' onkeypress="return ValidateKey()" Width="50%"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="TextBox3">*</asp:RequiredFieldValidator>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:Label ID="Label3" runat="server" Text='<%# Bind("Version") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:ButtonField Text="edit" ButtonType="Button" CommandName="EditMT" InsertVisible="False" />
                <asp:ButtonField Text="delete" ButtonType="Button" CommandName="DeleteMT" InsertVisible="False" />
                <asp:ButtonField Text="cancel" ButtonType="Button" CommandName="CancelMT" /> 
            </Columns>
            <PagerSettings Mode="NumericFirstLast"/>
            <HeaderStyle HorizontalAlign="Left" />
        </asp:GridView>
    </div>
    <br />
    <asp:Button ID="btnAddMessageType" runat="server" Text="Add MessageType" OnClick="btnAddMessageType_Click" />
    
    <asp:Button id="btnSave" onclick="btnSaveMessageType_Click" runat="server" Text="Save MessageType"></asp:Button>
    
    <asp:TextBox Visible="false" ID="tbSortDirection" runat="server"></asp:TextBox>
    <asp:TextBox Visible="false" ID="tbPage" runat="server"></asp:TextBox>
    <asp:TextBox Visible="false" ID="tbSortProperty" runat="server"></asp:TextBox>    


</asp:Content>

